﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="EDP.Application.Web.Permission._default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <script type="text/javascript">
        document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                F.f_disable('grid_List_ctl00_btn_query');
                __doPostBack('grid_List$ctl00$btn_query', '');
            }
        }
    </script>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="grid_List" runat="server" />
        <f:Grid ID="grid_List" runat="server" Title="权限管理" DataKeyNames="ID" Margin="10" EnableCheckBoxSelect="true" CheckBoxSelectOnly="true" RegionPosition="Center" SortField="ObjectName"
            OnSort="grid_List_Sort" OnPageIndexChange="grid_List_PageIndexChange" OnRowCommand="grid_List_RowCommand">
            <Toolbars>
                <f:Toolbar runat="server" ToolbarAlign="Right" QueryToolbar="true">
                    <Items>
                        <f:DropDownList ID="ddl_permissionType" runat="server" QueryName="PermissionTypeId" Margin="0" Width="150" />
                        <f:DropDownList ID="ddl_objectType" runat="server" QueryName="ObjectTypeId" Margin="0 0 0 10" Width="150" />
                        <f:TextBox ID="TextBox1" runat="server" EmptyText="授权对象名称" QueryName="ObjectName" Margin="0 0 0 10" Width="240" />
                        <f:TextBox ID="TextBox2" runat="server" EmptyText="所属权限对象/权限对象" QueryName="PermissionNameKeyrowd" Margin="0 0 0 10" Width="240" />
                        <f:Button ID="btn_query" runat="server" Text=" 查 询 " Icon="SystemSearch" Margin="0 0 0 10" OnClick="QueryClick" />
                        <f:ToolbarFill runat="server" />
                        <f:Button ID="btn_setPermission" runat="server" Margin="0 10 0 0" Icon="ApplicationKey" Text="设置权限"/>
                        <f:Button ID="btn_delete" runat="server" Margin="0 10 0 0" Icon="Delete" Text="删除权限" ConfirmTitle="删除权限" ConfirmText="是否删除所选权限？" ConfirmTarget="Self" ConfirmIcon="Question"
                            OnClick="btn_delete_Click"/>
                    </Items>
                </f:Toolbar>
            </Toolbars>
            <Columns>
                <f:BoundField DataField="ObjectTypeName" SortField="ObjectTypeId" Width="100" HeaderText="授权对象类型" />
                <f:BoundField DataField="ObjectName" ExpandUnusedSpace="true" HeaderText="授权对象名称" />
                <f:BoundField DataField="PermissionTypeName" SortField="PermissionTypeId" Width="100" HeaderText="权限对象类型" />
                <f:BoundField DataField="BelongPermissionName" ExpandUnusedSpace="true" HeaderText="所属权限对象名称" />
                <f:BoundField DataField="PermissionName" ExpandUnusedSpace="true" HeaderText="权限对象名称" />                
                <f:BoundField DataField="ElementId" Width="200" HeaderText="元素ID" NullDisplayText="--" />
                <f:CheckBoxField DataField="IsGridElement" Width="90" HeaderText="列表元素" TextAlign="center" />                
                <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" CommandTitle="权限管理" ToolTip="删除" Icon="Delete" EnableLock="true"
                    ConfirmTitle="删除权限" ConfirmText="是否删除该权限？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
            </Columns>
        </f:Grid>
        <f:Window ID="win_permission" runat="server" Target="Self" CloseAction="HidePostBack" OnClose="win_permission_Close" />
    </form>
</body>
</html>
